<!DOCTYPE html>
<html  lang="zh_CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>收货详情</title>
    <th:block th:include="~{common/common::commonHead}"/>
    <script th:src="@{/js/jqprint.js}"></script>
</head>
<!-- /Head -->
<!-- Body -->
<body data-width="850" data-height="420">
        <div class="widget-body grid-table">
            <div class="toolbar">
            <div class="toolbar-right">
                <div class="fl-right">
                    <div class="btn-group" role="group">
                        <button onclick="print();" class="btn btn-default">
                            <i class="fa fa-download fa-fw"></i>
                        </button>
                    </div>
                </div>
            </div>
            </div>
            <div id="deliverInfo"></div>
        </div>
</body>
<!--  /Body -->
</html>
<script>
    $(function(){
        $("#deliverInfo").gridTable({
            url: "invoice/listDetail",
            columns: [
                {title: "商品图片", field: "img", format: toImg},
                {title: "商品名称", field: "goodsName"},
                {title: "商品数量", field: "count",dataType:"number"},
                {title: "商品结算价", field: "goodsSettlementPrice",dataType:"decimal"},
                {title: "供应商", field: "supplierName"},
                {title: "监所", field: "prisonsName"},
                {title: "监区", field: "area"}
            ],
            params: $.getUrlParams(),
            showCheckbox:false,
            onDoubleClickRow:function(){},
            idField: "id",
            editUrl: "order/deliverEdit.html",
//            delUrl: "invoice/delInvoiceDetail",
            controls:{
                info:{
                    show:false
                },
                del:{
                    show:false
                }
            }

        });
    });
    function toImg(url) {
        return "<img src='"+url+"' width='40' height='40'>";
    }
    function  print(){
        $("#deliverInfo").jqprint();
    }
</script>